package com.feicheng.controller.shop.wx.fuwu.client;


import com.feicheng.common.result.ResultInfo;
import com.feicheng.persistence.model.VipMain;
import com.feicheng.service.IFClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author cailongyang
 * @since 2021-12-02
 */
@RestController("/wx/s/client/vip")
@RequestMapping("/wx/s/client/vip")
public class VipController {

    @Autowired
    IFClientService fClientService;

    @GetMapping("/page")
    public ResultInfo getVipByPage(
            @RequestParam(defaultValue="1") Integer current,
            @RequestParam(defaultValue="10") Integer size,
            Integer clientId) {

        VipMain vipMain = new VipMain();
        vipMain.setClientId(clientId);

        return fClientService.getVipsByPage(vipMain, current, size);
    }
}
